/***************************************************************
*  Copyright (c) 2007 by GroupMe! Team (www.groupme.net)
*  All rights reserved.
*
*  This file is part of the GroupMe! Project. Source code of 
*  this project is closed and redistribution of this code is
*  prohibited. 
*  
*  Contact: http://www.groupme.net
*
*  This copyright notice MUST APPEAR in all copies of the file!
***************************************************************/
package net.groupme.logging.model;

import net.groupme.model.Resource;
import net.groupme.model.User;

/**
 * created on Sep 20, 2007
 * 
 * This class implements a Navigation (e.g. free keyword search, search by tag, resource click, ...) Log Event.
 * 
 * @author Fabian Abel, <a href="mailto:abel@l3s.de">abel@l3s.de</a>
 * @author last edited by: $Author: fabian $
 * 
 * @version $Revision: 1.2 $ $Date: 2007-09-20 16:16:52 $
 */
public class LogEventNavigationImpl extends AbstractLogEvent implements LogEventNavigation {

	private String searchString = null;
	private Resource browsedResource = null;
	
	
	/**
	 * Creates a new LogEventNavigationImpl instance.
	 * @param user the user
	 * @param actionID ID of fulfilled action
	 */
	public LogEventNavigationImpl(User user, ActionIdentifier actionID) {
		super(user, actionID);
	}
	
	/**
	 * Creates a new LogEventNavigationImpl instance.
	 * @param user the user
	 * @param actionID ID of fulfilled action
	 * @param searchString free search string or value of tag (in case that the user clicks on a tag (e.g. within a tag cloud)
	 * @param browsedResource value of the resource that is visited 
	 */
	public LogEventNavigationImpl(User user, ActionIdentifier actionID, String searchString, Resource browsedResource) {
		super(user, actionID);
		this.searchString = searchString;
		this.browsedResource = browsedResource;
	}
	/**
	 * Creates a new LogEventNavigationImpl instance.
	 * @param user the user
	 * @param actionID ID of fulfilled action
	 * @param searchString free search string or value of tag (in case that the user clicks on a tag (e.g. within a tag cloud)
	 */
	public LogEventNavigationImpl(User user, ActionIdentifier actionID, String searchString) {
		super(user, actionID);
		this.searchString = searchString;
	}
	
	/**
	 * Creates a new LogEventNavigationImpl instance.
	 * @param user the user
	 * @param actionID ID of fulfilled action
	 * @param browsedResource value of the resource that is visited 
	 */
	public LogEventNavigationImpl(User user, ActionIdentifier actionID, Resource browsedResource) {
		super(user, actionID);
		this.browsedResource = browsedResource;
	}
	
	/**
	 * Creates a new LogEventNavigationImpl instance.
	 * @param id the ID
	 * @param user the user
	 * @param actionID ID of fulfilled action
	 */
	public LogEventNavigationImpl(int id, User user, ActionIdentifier actionID) {
		super(id, user, actionID);
	}
	
	/**
	 * Creates a new LogEventNavigationImpl instance.
	 *  @param id the ID
	 * @param user the user
	 * @param actionID ID of fulfilled action
	 * @param searchString free search string or value of tag (in case that the user clicks on a tag (e.g. within a tag cloud)
	 * @param browsedResource value of the resource that is visited 
	 */
	public LogEventNavigationImpl(int id, User user, ActionIdentifier actionID, String searchString, Resource browsedResource) {
		super(id, user, actionID);
		this.searchString = searchString;
		this.browsedResource = browsedResource;
	}
	/**
	 * Creates a new LogEventNavigationImpl instance.
	 * @param id the ID
	 * @param user the user
	 * @param actionID ID of fulfilled action
	 * @param searchString free search string or value of tag (in case that the user clicks on a tag (e.g. within a tag cloud)
	 */
	public LogEventNavigationImpl(int id, User user, ActionIdentifier actionID, String searchString) {
		super(id, user, actionID);
		this.searchString = searchString;
	}
	
	/**
	 * Creates a new LogEventNavigationImpl instance.
	 * @param id the ID
	 * @param user the user
	 * @param actionID ID of fulfilled action
	 * @param browsedResource value of the resource that is visited 
	 */
	public LogEventNavigationImpl(int id, User user, ActionIdentifier actionID, Resource browsedResource) {
		super(id, user, actionID);
		this.browsedResource = browsedResource;
	}

	/* (non-Javadoc)
	 * @see net.groupme.logging.model.LogEventNavigation#getBrowsedResource()
	 */
	public Resource getBrowsedResource() {
		return browsedResource;
	}
	/* (non-Javadoc)
	 * @see net.groupme.logging.model.LogEventNavigation#setBrowsedResource(net.groupme.model.Resource)
	 */
	public void setBrowsedResource(Resource browsedResource) {
		this.browsedResource = browsedResource;
	}
	/* (non-Javadoc)
	 * @see net.groupme.logging.model.LogEventNavigation#getSearchString()
	 */
	public String getSearchString() {
		return searchString;
	}
	/* (non-Javadoc)
	 * @see net.groupme.logging.model.LogEventNavigation#setSearchString(java.lang.String)
	 */
	public void setSearchString(String searchString) {
		this.searchString = searchString;
	}
}
